package org.gjy.m8.jdbc;

import org.junit.Test;

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

/**
 * @author gjy
 * @version 1.0
 * @since 2025-08-14 10:48:20
 */
public class StatementTest {

    @Test
    public void test2() {
        BigDecimal bd = new BigDecimal("12.1");
        BigDecimal multiply = bd.multiply(new BigDecimal("10"));
        System.out.println(multiply.doubleValue() % 1 == 0);

    }

    @Test
    public void test1() throws Exception {
        Connection connection = DriverManager.getConnection("");
        Statement statement = connection.createStatement();

        statement.getUpdateCount();

        boolean execute = statement.execute("", Statement.RETURN_GENERATED_KEYS);
        ResultSet rs = statement.getGeneratedKeys();
    }
}
